package com.oj.problem.domain;

import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.oj.common.annotation.Excel;
import com.oj.common.core.domain.BaseEntity;

/**
 * 题目管理对象 problem
 * 
 * @author xxx
 * @date 2025-03-15
 */
public class Problem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 题目ID */
    private Long id;

    /** 题目标题 */
    @Excel(name = "题目标题")
    private String title;

    /** 题目描述（Markdown格式） */
    @Excel(name = "题目描述", readConverterExp = "M=arkdown格式")
    private String description;

    /** 难度 */
    @Excel(name = "难度")
    private String difficulty;

    /** 标签（逗号分隔，如：数组,动态规划） */
    @Excel(name = "标签", readConverterExp = "逗=号分隔，如：数组,动态规划")
    private String tags;

    @Excel(name = "时间限制(ms)")
    private Integer timeLimit;

    @Excel(name = "空间限制(KB)")
    private Integer memoryLimit;

    /** 测试用例信息 */
    private List<TestCase> testCaseList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setDifficulty(String difficulty) 
    {
        this.difficulty = difficulty;
    }

    public String getDifficulty() 
    {
        return difficulty;
    }
    public void setTags(String tags) 
    {
        this.tags = tags;
    }

    public String getTags() 
    {
        return tags;
    }

    public List<TestCase> getTestCaseList()
    {
        return testCaseList;
    }

    public void setTestCaseList(List<TestCase> testCaseList)
    {
        this.testCaseList = testCaseList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("difficulty", getDifficulty())
            .append("tags", getTags())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("testCaseList", getTestCaseList())
            .toString();
    }

    public Integer getTimeLimit() {
        return timeLimit;
    }

    public void setTimeLimit(Integer timeLimit) {
        this.timeLimit = timeLimit;
    }

    public Integer getMemoryLimit() {
        return memoryLimit;
    }

    public void setMemoryLimit(Integer memoryLimit) {
        this.memoryLimit = memoryLimit;
    }
}
